package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Book;
import com.ruoyi.system.mapper.BookMapper;
import com.ruoyi.system.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookMapper bookMapper;
    @Override
    public int addBook(Book book) {
        return bookMapper.addBook(book);
    }

    @Override
    public List<Book> selectUserid(int userid) {
        return bookMapper.selectUserid(userid);
    }

    @Override
    public Book selectBookByid(int id) {
        return bookMapper.selectBookByid(id);
    }

    @Override
    public List<Book> selectBookByclassify(int userid, int classify, int classifyname) {
        return bookMapper.selectBookByclassify(userid,classify,classifyname);
    }

    @Override
    public int delete(int id) {
        return  bookMapper.delete(id);
    }

    @Override
    public int updateStatus(Book book){
         return  bookMapper.updateStatus(book);

    }
    @Override
    public List<Book> select() {
        return bookMapper.select();
    }

    @Override
    public List<Book> selectname(String name) {
        return bookMapper.selectname(name);
    }

    @Override
    public int look(Book book) {
        return bookMapper.look(book);
    }
}
